import axios from '@/request/http'
import { commonOutDTO } from '@/api/common.d'

export default class zzjgService {
  // 获取单位部门
  static getDwbm(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/dwbm/queryByDwbm', data)
  }
  // 获取门户单位下拉列表
  static queryAllOrg(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/api/dlgl/queryAllOrg', data)
  }
  // 树
  static queryByDwbm(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/rybm/queryByDwbm', data)
  }
  //
  static queryZzjgRole(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/bmbm/queryByDwbm', data)
  }

  // 表格
  static queryTable(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/rybm/query', data)
  }
  // 停职，复职
  static stopWorks(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/rybm/suspension', data)
  }
  // 清空密码
  static emptyPassword(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/rybm/emptyPwd', data)
  }
  // 添加人员
  static addPerson(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/rybm/add', data)
  }
  // 设置人员登录方式
  static setPersonLoginMode(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/rybm/loginType', data)
  }
  // 获取回收站的部门信息
  static queryBmbmByRecycle(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/bmbm/queryByRecycle', data)
  }
  // 获取回收站的人员信息
  static queryRyglByRecycle(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/rybm/queryByRecycle', data)
  }
  // 删除放入回收站
  static deleteIntoRecycle(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/rybm/delete', data)
  }
  // 恢复人员
  static resumeByRecycle(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/rybm/resumeByRecycle', data)
  }
  // 登录
  static toLogin(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/rybm/login', data)
  }
  // 删除回收站人员
  static deletRyRecycle(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/rybm/deleteByRecycle', data)
  }
  // 新增部门
  static addBm(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/bmbm/add', data)
  }
  // 删除部门
  static deletBm(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/bmbm/delete', data)
  }
  // 获取单位下部门下拉列表
  static getBmSelect(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/bmbm/queryByDwbm', data)
  }
  // 同步部门数据
  static tbbmsj(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/dwbm/synchronize', data)
  }
  // 恢复回收站部门
  static resumeByRecycleBm(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/bmbm/resumeByRecycle', data)
  }
  // 永久删除回收站部门
  static yjscBm(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/bmbm/deleteByRecycle', data)
  }
  // 修改部门
  static changeBm(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/bmbm/update', data)
  }
  // 获取部门信息
  static getBmInfo(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/bmbm/get', data)
  }
  // 获取单位信息
  static getDanwInfo(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/dwbm/get', data)
  }
  // 获取个人信息
  static getGrInfo(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/rybm/get', data)
  }
  // 新增角色
  static addRoleApi(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/jsbm/add', data)
  }
  // (把当前部门的角色复制出去)
  static copyBmRole(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/jsbm/copyRole', data)
  }
  static getRoleInfo(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/jsbm/get', data)
  }
  // 修改角色
  static updateRoleApi(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/jsbm/update', data)
  }
  // 删除角色
  static deletRoleApi(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/jsbm/delete', data)
  }

  // 修改人员编码
  static updateRybm(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/rybm/update', data)
  }
  // 新增人员角色分配
  static addryjsfp(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/ryjsfp/add', data)
  }
  // 获取列表人员编码(人员列表)
  static queryRyList(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/rybm/queryRyList', data)
  }
  // 获取列表人员编码(人员列表)
  static queryBmTable(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/dm/fldm/queryBmLb', data)
  }
  // 对单位下的角色下拉列表
  static queryByDwjsbm(data: any): Promise<commonOutDTO<any[]>> {
    return axios.post('/zzjg/jsbm/queryByDw', data)
  }
  // 删除人员角色分配
  static deleteryjsfp(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/ryjsfp/delete', data)
  }
  //  添加角色审批显示名称
  static addBtnSpxsmc(): Promise<commonOutDTO<any>> {
    return axios.post('/sp/spjbdy/queryAll')
  }
  // 获取单位下最大的部门序号
  static getMaxXhByDwbm(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/bmbm/findMaxXhByDwbm', data)
  }
  // 获取单位下部门下拉列表
  static queryByDwbmBmbm(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/bmbm/queryByDwbm', data)
  }
  // 获取单位列表
  static queryListByDwbm(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/dwbm/queryListByDwbm', data)
  }
  // 根据lbbm查询分类代码树
  static queryBmLbFldm(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/dm/bmfldm/listBmfldm', data)
  }
  // 添加人员序号接口
  static findMaxXhRybm(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/rybm/findMaxXh', data)
  }
  // 解锁
  static jieShuoApi(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/rybm/emptyDlcs', data)
  }
  // 重置密码
  static chongzhimima(data: any): Promise<commonOutDTO<any>> {
    return axios.post('/zzjg/rybm/updatePwd', data)
  }
}
